package com.hx.learn.tx.spring.mapper;

import com.hx.learn.tx.spring.model.Book;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author WYX
 * @create 2020-04-04-8:57
 */
public interface BookMapper {

    //增加一本书
    int addBook(Book book);

    //修改一本书
    int updateBook(Book book);

    //删除一本书
    int deleteBookById(@Param("bookID") int id);

    //查询一本书
    Book queryBookById(@Param("bookID") int id);

    //查询全部书
    List<Book> queryAllBook();

    //通过书名查书籍
    Book queryBookByName(@Param("bookName") String bookName);
}
